negotiator.boaframework
Class NegotiationSession

java.lang.Object
  extended by negotiator.boaframework.NegotiationSession

public class NegotiationSession
extends java.lang.Object

This is a class which manages all the negotiation session pertinent information to a single agent.

Author:
Alex Dirkzwager, Mark Hendrikx

Constructor Summary
NegotiationSession(UtilitySpace utilitySpace, Timeline timeline)
          Create a negotiation session which is used to keep track of the negotiation state.
NegotiationSession(UtilitySpace utilitySpace, Timeline timeline, OutcomeSpace outcomeSpace)
          Create a negotiation session which is used to keep track of the negotiation state.
 
Method Summary
 double getDiscountedUtility(Bid bid, double time)
          Returns the discounted utility of a bid given the bid and the time at which it was offered.
 double getDiscountFactor()
          Returns the discount factor of the utilityspace.
 Domain getDomain()
          Returns the negotiation domain.
 java.util.ArrayList<Issue> getIssues()
           
 BidDetails getMaxBidinDomain()
          Returns the best bid in the domain.
 BidDetails getMinBidinDomain()
          Returns the worst bid in the domain.
 BidHistory getOpponentBidHistory()
          Returns the bidding history of the opponent.
 OutcomeSpace getOutcomeSpace()
          Returns the space of possible outcomes in the domain.
 BidHistory getOwnBidHistory()
          Returns the bidding history of the agent.
 double getTime()
          Returns the normalized time (t = [0,1])
 Timeline getTimeline()
           
 UtilitySpace getUtilitySpace()
          Returns the utilityspace of the agent.
 void setOutcomeSpace(OutcomeSpace outcomeSpace)
          Method used to set the outcomespace.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NegotiationSession

public NegotiationSession(UtilitySpace utilitySpace,
                          Timeline timeline)
Create a negotiation session which is used to keep track of the negotiation state.

Parameters:
utilitySpace - of the agent.
timeline - of the current negotiation.

NegotiationSession

public NegotiationSession(UtilitySpace utilitySpace,
                          Timeline timeline,
                          OutcomeSpace outcomeSpace)
Create a negotiation session which is used to keep track of the negotiation state.

Parameters:
utilitySpace - of the agent.
timeline - of the current negotiation.
outcomeSpace - representation of the possible outcomes.
Method Detail

getOpponentBidHistory

public BidHistory getOpponentBidHistory()
Returns the bidding history of the opponent.

Returns:
bidding history of the opponent.

getOwnBidHistory

public BidHistory getOwnBidHistory()
Returns the bidding history of the agent.

Returns:
bidding history of the agent.

getDiscountFactor

public double getDiscountFactor()
Returns the discount factor of the utilityspace. Each utilityspace has a unique discount factor.

Returns:
discount factor of the utilityspace.

getIssues

public java.util.ArrayList<Issue> getIssues()
Returns:
issues of the domain.

getTimeline

public Timeline getTimeline()
Returns:
timeline of the negotiation.

getTime

public double getTime()
Returns the normalized time (t = [0,1])

Returns:
normalized time.

getDomain

public Domain getDomain()
Returns the negotiation domain.

Returns:
domain of the negotiation.

getUtilitySpace

public UtilitySpace getUtilitySpace()
Returns the utilityspace of the agent.

Returns:
utilityspace of the agent.

getOutcomeSpace

public OutcomeSpace getOutcomeSpace()
Returns the space of possible outcomes in the domain. The returned value may be null.

Returns:
outcomespace if available.

setOutcomeSpace

public void setOutcomeSpace(OutcomeSpace outcomeSpace)
Method used to set the outcomespace. Setting an outcomespace makes method such as getMaxBidinDomain much more efficient.

Parameters:
outcomeSpace - to be set.

getMaxBidinDomain

public BidDetails getMaxBidinDomain()
Returns the best bid in the domain. If the outcomespace is set, it is used in this step. Else a highly inefficient method is used.

Returns:
bid with lowest highest possible utility.

getMinBidinDomain

public BidDetails getMinBidinDomain()
Returns the worst bid in the domain. If the outcomespace is set, it is used in this step. Else a highly inefficient method is used.

Returns:
bid with lowest possible utility.

getDiscountedUtility

public double getDiscountedUtility(Bid bid,
                                   double time)
Returns the discounted utility of a bid given the bid and the time at which it was offered.

Parameters:
bid - which discount utility is requested.
time - at which the bid was offered.
Returns:
discounted utility of the given bid at the given time.